package com.gxa.service.impl;

import com.gxa.service.XsDdService;
import com.gxa.mapper.XsDdMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service("xsDdService")
public class XsDdServiceImpl implements XsDdService {

    @Resource
    XsDdMapper xsDdMapper;


    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.SUPPORTS,rollbackFor = {Throwable.class})
    public List<Map<String, Object>> selectAllByPage(Map<String,Object> map) {
        return xsDdMapper.selectAllByPage(map);
    }

    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.SUPPORTS,rollbackFor = {Throwable.class})
    public Integer findAllXsDd(Map map) {
        return xsDdMapper.selectAll(map);
    }

    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.REQUIRED,rollbackFor = {Throwable.class})
    public Integer insert(Map map) {
        return xsDdMapper.insert(map);
    }

    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.SUPPORTS,rollbackFor = {Throwable.class})
    public Map<String, Object> selectById(Integer id) {
        return xsDdMapper.selectById(id);
    }


    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.SUPPORTS,rollbackFor = {Throwable.class})
    public List<Map<String,Object>> selectByClientsName() {
        return xsDdMapper.selectByClientsName();
    }

    @Override
    public List<Map<String, Object>> selectByTypeOfCustomer() {
        return xsDdMapper.selectByTypeOfCustomer();
    }

    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.SUPPORTS,rollbackFor = {Throwable.class})
    public List<Map<String, Object>> selectBySalesMan() {
        return xsDdMapper.selectBySalesMan();
    }

    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.SUPPORTS,rollbackFor = {Throwable.class})
    public List<Map<String, Object>> selectByTypeOfSales() {
        return xsDdMapper.selectByTypeOfSales();
    }

    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.SUPPORTS,rollbackFor = {Throwable.class})
    public List<Map<String, Object>> selectByWareHouse() {
        return xsDdMapper.selectByWareHouse();
    }

    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.REQUIRED,rollbackFor = {Throwable.class})
    public Integer deleteById(Map map) {
        return xsDdMapper.deleteById(map);
    }

    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.REQUIRED,rollbackFor = {Throwable.class})
    public Integer deleteByParams(List<Integer> list) {
        return xsDdMapper.deleteByParams(list);
    }

    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.REQUIRED,rollbackFor = {Throwable.class})
    public Integer update(Map map) {
        return xsDdMapper.update(map);
    }

    @Override
    public Integer updateSelectById(Integer id) {
        return xsDdMapper.updateSelectById(id);
    }

    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.SUPPORTS,rollbackFor = {Throwable.class})
    public List<Map<String, Object>> selectByLike(Map<String, Object> map) {
        return xsDdMapper.selectByLike(map);
    }

    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.SUPPORTS,rollbackFor = {Throwable.class})
    public Integer selectByLikeCount(Map map) {
        return xsDdMapper.selectByLikeCount(map);
    }


    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.SUPPORTS,rollbackFor = {Throwable.class})
    public List<Map<String, Object>> selectAllByPersonPage(Integer start, Integer pageSize) {
        return xsDdMapper.selectAllByPersonPage(start,pageSize);
    }

    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.SUPPORTS,rollbackFor = {Throwable.class})
    public List<Map<String, Object>> selectByPersonLike(Map<String, Object> map) {
        return xsDdMapper.selectByPersonLike(map);
    }

    @Override
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.SUPPORTS,rollbackFor = {Throwable.class})
    public Integer selectByPersonLikeCount(Map map) {
        return xsDdMapper.selectByPersonLikeCount(map);
    }

    @Override
    public Integer selectByPersonLikeCount2() {
        return xsDdMapper.selectByPersonLikeCount2();
    }


}
